import { Component, OnInit } from '@angular/core';

import { QuestionAnswerlist } from './shared/question-answerlist.model';
import { QuestionAnswerlistService } from './shared/question-answerlist.service';

@Component({
	selector: 'question-answerlist',
	templateUrl: 'question-answerlist.component.html',
	providers: [QuestionAnswerlistService]
})

export class QuestionAnswerlistComponent implements OnInit {
	questionAnswerlist: QuestionAnswerlist[] = [];

	constructor(private questionAnswerlistService: QuestionAnswerlistService) { }

	ngOnInit() {
		this.questionAnswerlistService.getList().subscribe((res) => {
			this.questionAnswerlist = res;
		});
	}
}